🧪 QA · Version 1.0

CreateProject · Test Scenarios
+ Playwright + AI Testing Guide

Comprehensive test documentation for ConstructQ CreateProject Web v14.0 · 5-step wizard · 12 test areas · 55+ test cases · Playwright automation + AI testing tools 2025
📅 วันที่: 9 ก.ค. 2569 (2026-07-09) 👤 Owner: วุธ (PM/SA · QA Lead) 🎯 Audience: QA · Dev · Automation 📄 Source: CreateProject_v14.0.html
12
Test Areas
55+
Test Cases
5
Wizard Steps
8
AI Tools Compared

01บทนำ · About This Guide

Test scope · deliverables · references

เอกสารนี้เป็น Test Documentation ครบวงจรสำหรับหน้าจอ CreateProject Web v14.0 ประกอบด้วย:

  • Test Scenarios · 12 test areas · ครอบคลุมทุก workflow ของ 5-step wizard
  • Test Cases · 55+ cases · Positive / Negative / Boundary / UI / Accessibility
  • Playwright Automation Guide · Setup · Page Object Model · Sample scripts
  • AI Testing Tools Comparison · เปรียบเทียบเครื่องมือ AI testing ปี 2025 · แนะนำที่ดีที่สุด
📌
Reference file: ConstructQ_CreateProject_v14.0.html · React SPA · 5-step wizard · bilingual TH/EN · List + Form views · Confirm popup on save

02Overview หน้าจอ · Screen Structure

2 main views + 5-step wizard + confirm popups

🗺️ Screen Map

ViewRouteFunction
Project List/project/setup (view=list)Table + cards ของโครงการทั้งหมด · summary stats · New/Edit/Delete
Create Formview=form · editingId=null5-step wizard · Left stepper + Right main content
Edit Formview=form · editingId=P-001เหมือน create form · pre-filled data · button "บันทึกการแก้ไข"
Save Confirm ModalsaveConfirm !== nullSummary card + Confirm/Cancel
Delete Confirm ModaldelConfirm !== nullWarning + Confirm/Cancel
WBS Template Picker Modalเลือกจาก 8 standard templatesGrid + recommended tag

📋 5-Step Wizard

#Step TitleKey FieldsBusiness Rules
01ข้อมูลโครงการ · Project Details code (auto/manual) · name · type · client · value · start · end · duration · desc Required: name, type, client, start, end · Duration = end-start · start < end
02ไซต์ / โซน · Sites/Zones Site (name, code, address) → Zone (code, area) → Floor → Room Address auto-fill (tambon → district/province/postal) · nested hierarchy
03สมาชิก · Members name · email · role · phone Roles: PM · QCM · Inspector · Fixer · Executive · email format
04ไฟล์แบบโครงการ · Files fileName · fileType · version · uploadBy Types: Drawing, Spec, Contract, BOQ, Other · uploadBy = ต้องเป็นสมาชิก
05WBS · Work Breakdown 3 modes: template · manual · import Template = ใช้จาก 8 standard · Import = .xlsx with WBS-L1/L2/L3 columns

🎨 UI Components

  • AppShell · Sidebar + Topbar + Breadcrumb · Language toggle · User profile
  • Cp Back Button · Circular ← ก่อน title (v13.0+)
  • Cp Stepper · Left vertical · click-to-jump navigation
  • Cp Save Confirm · Summary popup (v14.0)
  • Toast Notifications · Success · Error

03Test Strategy

Test types · priority · environment · risk-based approach

🎯 Test Types Covered

Test TypeObjectiveCoverage
Positiveทำงานตาม happy path~50%
Negativeerror/invalid input · empty · duplicate~25%
Boundaryค่าขอบ · min/max · empty vs 1 vs many~10%
UI/UXLayout · responsive · animation~10%
AccessibilityKeyboard nav · ARIA · contrast · screen reader~5%

⚡ Priority Levels

PriorityCriteriaExecution
P1 · CriticalBlocker · ห้ามผ่านถ้าไม่ผ่าน · เกี่ยวกับ data integrity/saveทุก build
P2 · HighFeature หลัก · ผลกระทบต่อ UXทุก sprint
P3 · MediumEnhancement · edge caseFull regression

🌐 Test Environments

  • Local Dev: Chrome + Firefox · manual testing สำหรับ dev
  • Staging: Chrome + Firefox + Safari + Edge · Playwright automated · nightly runs
  • UAT: Real users + accessibility tools · Weekly
  • Production: Smoke tests only · post-deploy

04Test Scenarios + Test Cases

12 areas · 55+ detailed test cases

4.1 · 📋 Project List View

TC ID Scenario Steps Expected Result Priority Type
TC-01เข้าหน้า Project List 1. Login
2. Navigate to /project/setup
แสดง breadcrumb · summary stats · list ของโครงการ (cards หรือ table) P1Pos
TC-02Summary stats แสดงถูกต้อง 1. เข้าหน้า List แสดง: จำนวนโครงการทั้งหมด · ดำเนินการอยู่ · เสร็จสิ้น · มูลค่ารวม P2Pos
TC-03Empty state (ไม่มีโครงการ) 1. เริ่ม tenant ใหม่ที่ไม่มี project แสดง empty state message + CTA "สร้างโครงการใหม่" P2UI
TC-04คลิก card เข้า Edit form 1. คลิกที่ card ของ project P-001 เข้า view=form · editingId=P-001 · pre-filled data P1Pos
TC-05ปุ่ม "สร้างโครงการใหม่" 1. กดปุ่มสร้างโครงการใหม่ เข้า view=form · editingId=null · form ว่าง · aria current step=1 P1Pos

4.2 · 📝 Step 01 · Project Details

TC ID Scenario Steps Expected Result Priority Type
TC-06Auto code toggle default 1. เข้า Create form · Step 01 รหัสโครงการ default เป็น "อัตโนมัติ" (readonly) · แสดงตัวอย่าง P-YYYY-### P2Pos
TC-07Manual code toggle · ใส่ค่าได้ 1. Toggle เป็น "กำหนดเอง"
2. พิมพ์ "P-CUSTOM-001"
Field เปิด editable · รับค่า custom · toggle กลับ auto = clear P2Pos
TC-08Required · name เว้นว่าง 1. ทิ้ง name ว่าง
2. กดถัดไป
Error message ใต้ field · block navigation · aria-invalid P1Neg
TC-09Project type dropdown · 9 options 1. เปิด dropdown type แสดง 9 options (อาคารสำนักงาน · พักอาศัย · โครงสร้างพื้นฐาน · Renovation · โรงงาน · Data Center · โซล่าเซลล์ · EV Charger · โรงพยาบาล) P2Pos
TC-10Value (บาท) · รับตัวเลข format ถูก 1. พิมพ์ "50000000" แสดง "50,000,000 บาท" · thousand separator · reject alpha P2Pos
TC-11Value · reject negative 1. พิมพ์ "-100000" Error "มูลค่าต้องเป็นบวก" · block save P2Neg
TC-12Date range · start > end 1. ตั้ง start = 2027-01-01
2. ตั้ง end = 2026-01-01
Error "วันเริ่มต้องมาก่อนวันสิ้นสุด" · durationErr P1Neg
TC-13Duration auto-calc 1. ตั้ง start = 2026-01-01
2. ตั้ง end = 2026-12-31
Duration แสดง "รวมระยะเวลา 364 วัน (12.1 เดือน)" P2Pos
TC-14Description · optional 1. ปล่อย description ว่าง
2. Next
ไม่มี error · ผ่านไป Step 02 P3Pos

4.3 · 🏗️ Step 02 · Sites/Zones

TC IDScenarioSteps Expected ResultPriorityType
TC-15Empty state · ยังไม่มีไซต์ 1. เข้า Step 02 ใหม่ แสดง 'ยังไม่มีไซต์งาน — กด "เพิ่มไซต์" เพื่อเริ่ม' + CTA P2UI
TC-16เพิ่ม Site 1. กด "เพิ่มไซต์"
2. กรอก siteName + siteCode
Site ถูกเพิ่ม · แสดง card ที่มี actions (edit/duplicate/delete/collapse) P1Pos
TC-17Address auto-fill · tambon 1. พิมพ์ "ห้วยขวาง" ใน address sub Autocomplete แสดง options · เลือกแล้วเติมอำเภอ/จังหวัด/รหัสไปรษณีย์อัตโนมัติ P1Pos
TC-18Address · empty state 1. พิมพ์ "xxxxx" แสดง "ไม่พบ — ลองพิมพ์คำอื่น" P3Neg
TC-19เพิ่ม Zone ในไซต์ 1. ใน Site card · กด "เพิ่มโซน"
2. กรอก zoneCode, zoneName, zoneArea
Zone ถูกเพิ่มใต้ Site · nested hierarchy · sum แสดงในสรุป P1Pos
TC-20เพิ่ม Floor + Room 1. ใน Zone · กด "เพิ่มชั้น"
2. กด "เพิ่มห้อง"
Nested 4 ระดับ (Site → Zone → Floor → Room) · แต่ละระดับมี code/name P2Pos
TC-21Duplicate Site 1. กด duplicate icon บน Site card สำเนา Site (พร้อม zones/floors/rooms) · ชื่อ "...(สำเนา)" P3Pos
TC-22Collapse/Expand Site 1. กด "ย่อ" / "ขยาย" Zones ถูกซ่อน/แสดง · smooth animation · state persist P3UI

4.4 · 👥 Step 03 · Members

TC IDScenarioSteps Expected ResultPriorityType
TC-23Empty state 1. เข้า Step 03 ใหม่ 'ยังไม่มีสมาชิก — กด "เพิ่มรายการ" เพื่อเริ่ม' P3UI
TC-24เพิ่มสมาชิก · valid data 1. name = "สมชาย"
2. email = "somchai@test.com"
3. role = "ผู้จัดการโครงการ"
4. phone = "0812345678"
Member ถูกเพิ่ม · row แสดงข้อมูล + delete action P1Pos
TC-25Email format · invalid 1. email = "not-an-email" Error "รูปแบบอีเมลไม่ถูกต้อง" · aria-invalid P1Neg
TC-26Role dropdown · 5 options 1. เปิด role dropdown 5 options (PM · QCM · Inspector · Fixer · Executive) P2Pos
TC-27Phone · non-numeric 1. phone = "abc123" Error หรือ reject alpha · แสดง hint format P2Neg
TC-28Duplicate email · 2 members 1. เพิ่ม 2 members ที่มี email เดียวกัน Warning "อีเมลนี้ถูกใช้แล้ว" หรือ block · ตามที่ business rule กำหนด P2Neg

4.5 · 📎 Step 04 · Files

TC IDScenarioSteps Expected ResultPriorityType
TC-29Empty state + no members hint 1. เข้า Step 04 (Step 03 ว่าง) 'ยังไม่มีไฟล์' + hint "(ต้องเพิ่มสมาชิกใน Timeline 03 ก่อน)" P2UI
TC-30เพิ่มไฟล์ · valid 1. fileName = "แบบ-STR-01.pdf"
2. fileType = "Drawing"
3. version = "1.0"
4. uploadBy = "สมชาย"
File added · แสดง row P1Pos
TC-31File type dropdown · 5 options 1. เปิด fileType dropdown 5 options (Drawing · Specification · Contract · BOQ · Other) P2Pos
TC-32uploadBy = สมาชิก · picker 1. คลิก uploadBy field Dropdown แสดงเฉพาะสมาชิกที่มีใน Step 03 · เลือกได้ P2Pos

4.6 · 🏗️ Step 05 · WBS

TC IDScenarioSteps Expected ResultPriorityType
TC-33Mode selection · 3 modes 1. เข้า Step 05 (new project) แสดง 3 mode cards (Template / Manual / Import) + "แนะนำ" tag บน mode ที่เหมาะ P1Pos
TC-34Template mode · เลือก template 1. เลือก mode "ใช้เทมเพลทมาตรฐาน"
2. คลิก card ของ template
Modal picker เปิด · แสดง 8 templates · เลือก 1 ↦ apply P1Pos
TC-35Template applied · แสดง WBS rows 1. เลือก template "คอนโด v1.1" Toast "ใช้เทมเพลท ... เรียบร้อย — {count} รายการ" · WBS tree แสดง L1/L2/L3 P1Pos
TC-36Manual mode · เพิ่ม row 1. เลือก "กรอกเอง"
2. เพิ่ม L1 row
เปิดตารางว่าง · เพิ่ม row · แก้ inline · code, name, level, refStd, risk, HW P1Pos
TC-37Import mode · valid Excel 1. เลือก Import
2. Upload .xlsx ที่มี WBS-L1/L2/L3 columns
Preview modal แสดง rows · confirm ↦ import P2Pos
TC-38Import · invalid format 1. Upload .xlsx ที่ไม่มี columns ถูกต้อง Error "รูปแบบไฟล์ไม่ถูกต้อง" · block import P2Neg
TC-39เปลี่ยน mode ระหว่างใช้งาน 1. Template mode มี data
2. กด "เปลี่ยนวิธี"
Warning "จะสูญเสียข้อมูลเดิม" · ยืนยัน ↦ clear + switch P2Neg

4.7 · 💾 Save Confirm Popup (v14.0)

TC IDScenarioSteps Expected ResultPriorityType
TC-40Create mode · confirm popup summary 1. กรอก 5 steps
2. กด "สร้างโครงการ"
Popup summary แสดง: code, name, type, client, value, timeline, จำนวน sites/zones/members/files/WBS · icon 🚀 · title "ยืนยันการสร้างโครงการ" P1Pos
TC-41Edit mode · confirm popup title 1. Edit existing project
2. กด "บันทึกการแก้ไข"
Popup title = "ยืนยันการแก้ไข" · icon 💾 (สีฟ้า) · summary เดียวกัน P1Pos
TC-42Cancel · ปิด popup · ไม่บันทึก 1. เปิด confirm
2. กด "ยกเลิก"
Popup ปิด · กลับไปฟอร์ม · data ยังอยู่ · ไม่ save P1Pos
TC-43Confirm · save + toast + back to list 1. เปิด confirm
2. กด "ยืนยัน"
บันทึก · toast success · redirect กลับ list view P1Pos
TC-44Summary stats ตรงกับข้อมูลจริง 1. มี 2 sites (5 zones · 8 files · 6 members · 45 WBS rows)
2. เปิด confirm popup
Stats แสดง 2 · 5 · 6 · 8 · 45 ตรงตามข้อมูลจริง P2Bnd

4.8 · ✏️ Edit Mode

TC IDScenarioSteps Expected ResultPriorityType
TC-45Load existing · all data prefilled 1. คลิก card ของ P-001 All 5 steps มีข้อมูล · code, sites, members, files, WBS ครบ · title "← แก้ไขโครงการ" P1Pos
TC-46Edit + Save · data ถูก update 1. เปลี่ยน name
2. บันทึก + confirm
List view แสดง name ใหม่ · updatedAt เปลี่ยน P1Pos
TC-47Back button · unsaved changes warning 1. Edit + เปลี่ยน field
2. กด back (←)
Warning "มีการแก้ไข ยังไม่บันทึก" · confirm ↦ back · cancel ↦ อยู่ต่อ P2Neg

4.9 · 🗑️ Delete Project

TC IDScenarioSteps Expected ResultPriorityType
TC-48Delete · confirm modal 1. คลิก delete บน P-001 Modal แสดง warning "ข้อมูลทั้งหมด (Zone, สมาชิก, ไฟล์, WBS) จะถูกลบ" · [ยกเลิก][ยืนยันลบ] P1Pos
TC-49Cancel delete 1. เปิด delete modal
2. กด "ยกเลิก"
Modal ปิด · project ยังอยู่ P1Pos
TC-50Confirm delete · removed from list 1. Confirm delete Project หายจาก list · toast success · summary stats update P1Pos

4.10 · 🌐 Language Toggle

TC IDScenarioSteps Expected ResultPriorityType
TC-51TH → EN · all UI updated 1. TH mode
2. คลิก EN flag
All labels · buttons · headers · stepper · error messages เปลี่ยนเป็น EN P1Pos
TC-52Preserve data on language switch 1. กรอกข้อมูล
2. Toggle EN
3. Toggle TH
Data ทั้งหมดยังอยู่ · ไม่หาย P1Pos

4.11 · 📊 Excel Export/Import

TC IDScenarioSteps Expected ResultPriorityType
TC-53Export project · valid xlsx 1. Edit project
2. กด Export
Download .xlsx มี 5 sheets (Project · Sites · Members · Files · WBS) P2Pos
TC-54Import blank · new project 1. Import empty template Preview empty rows · confirm ↦ new project blank P3Pos

4.12 · ♿ Accessibility

TC IDScenarioSteps Expected ResultPriorityType
TC-55Keyboard navigation · full flow 1. Tab จาก field แรก · ผ่านทุก step ด้วย Tab + Enter โฟกัสเห็นชัด · ไม่ trap · Enter บนปุ่ม = submit P2A11y
TC-56Screen reader · aria labels 1. เปิด NVDA/VoiceOver · scan form ทุก input มี aria-label · ปุ่มมี text · error announced P2A11y
TC-57Color contrast · WCAG AA 1. Run axe-core scan All text/bg contrast ≥ 4.5:1 (AA) P2A11y
📊
Test Case สรุป: รวมทั้งหมด 57 test cases · P1 = 22 · P2 = 25 · P3 = 10 · Positive 32 · Negative 12 · Boundary 4 · UI 6 · Accessibility 3

05Playwright Automation Guide

Setup · Page Object Model · Sample code · CI/CD

🚀 Setup

  1. Install: npm init playwright@latest · เลือก TypeScript · Chromium+Firefox+WebKit
  2. Structure: สร้างโฟลเดอร์ · tests/, pages/, fixtures/, data/
  3. Config: แก้ playwright.config.ts · baseURL, retries, screenshot on failure, trace on retry
  4. CI: เพิ่ม GitHub Action workflow · run tests on PR + nightly
  5. Report: เปิด HTML report ด้วย npx playwright show-report

📁 Recommended Project Structure

treetests/
├── create-project/
│   ├── list.spec.ts
│   ├── step01-project.spec.ts
│   ├── step02-sites.spec.ts
│   ├── step03-members.spec.ts
│   ├── step04-files.spec.ts
│   ├── step05-wbs.spec.ts
│   ├── save-confirm.spec.ts
│   └── e2e-full-flow.spec.ts
pages/
├── CreateProjectPage.ts       # Page Object Model
├── ProjectListPage.ts
└── SaveConfirmModal.ts
fixtures/
├── auth.ts                    # Login fixture
└── test-data.ts               # Sample project data
data/
├── projects.json
└── wbs-templates.xlsx
playwright.config.ts

🎯 Page Object Model · CreateProjectPage.ts

TypeScriptimport { Page, Locator, expect } from '@playwright/test';

export class CreateProjectPage {
  readonly page: Page;
  readonly stepperItems: Locator;
  readonly btnNext: Locator;
  readonly btnBack: Locator;
  readonly btnCreate: Locator;
  readonly btnSave: Locator;

  constructor(page: Page) {
    this.page = page;
    this.stepperItems = page.locator('.cp-stepper .cp-step');
    this.btnNext = page.getByRole('button', { name: /ถัดไป|Next/ });
    this.btnBack = page.getByRole('button', { name: /ย้อนกลับ|Back/ });
    this.btnCreate = page.getByRole('button', { name: /สร้างโครงการ|Create Project/ });
    this.btnSave = page.getByRole('button', { name: /บันทึกการแก้ไข|Save Changes/ });
  }

  // Step 01 · Project Details
  async fillStep01(data: {
    codeMode?: 'auto' | 'manual';
    code?: string;
    name: string;
    type: string;
    client: string;
    value: number;
    startDate: string;
    endDate: string;
    description?: string;
  }) {
    const p = this.page;
    if (data.codeMode === 'manual') {
      await p.getByLabel('กำหนดเอง').click();
      await p.getByLabel(/รหัสโครงการ/).fill(data.code ?? '');
    }
    await p.getByLabel(/^ชื่อโครงการ/).fill(data.name);
    await p.getByLabel(/ประเภทโครงการ/).selectOption(data.type);
    await p.getByLabel(/เจ้าของโครงการ/).fill(data.client);
    await p.getByLabel(/มูลค่า/).fill(String(data.value));
    await p.getByLabel(/วันที่เริ่ม/).fill(data.startDate);
    await p.getByLabel(/วันที่สิ้นสุด/).fill(data.endDate);
    if (data.description) {
      await p.getByLabel(/รายละเอียด/).fill(data.description);
    }
  }

  // Step 02 · Add Site
  async addSite(site: { name: string; code: string; }) {
    await this.page.getByRole('button', { name: /เพิ่มไซต์/ }).click();
    const lastCard = this.page.locator('.cp-site-card').last();
    await lastCard.getByLabel(/ชื่อไซต์งาน/).fill(site.name);
    await lastCard.getByLabel(/รหัสไซต์/).fill(site.code);
  }

  async gotoStep(stepNum: number) {
    await this.stepperItems.nth(stepNum - 1).click();
  }

  async submitCreate() {
    await this.btnCreate.click();
    // Wait for confirm popup
    await this.page.getByRole('dialog').waitFor({ state: 'visible' });
  }
}

✅ Sample Test · E2E Full Flow

TypeScriptimport { test, expect } from '@playwright/test';
import { CreateProjectPage } from '../pages/CreateProjectPage';

test.describe('CreateProject · E2E', () => {
  test.beforeEach(async ({ page }) => {
    await page.goto('/project/setup');
    await page.getByRole('button', { name: /สร้างโครงการใหม่/ }).click();
  });

  test('TC-40 · Create project · complete 5-step wizard', async ({ page }) => {
    const cp = new CreateProjectPage(page);

    // Step 01
    await cp.fillStep01({
      name: 'Tarnas Tower Phase 2',
      type: 'อาคารสำนักงาน',
      client: 'บ.ธาร์ณัส จำกัด',
      value: 820000000,
      startDate: '2026-08-01',
      endDate: '2028-12-31',
    });
    await cp.gotoStep(2);

    // Step 02 · Sites
    await cp.addSite({ name: 'อาคาร A', code: 'S-01' });
    await cp.addSite({ name: 'อาคาร B', code: 'S-02' });
    await cp.gotoStep(5);

    // Skip to submit
    await cp.submitCreate();

    // Verify Confirm Popup
    const dialog = page.getByRole('dialog');
    await expect(dialog).toContainText('ยืนยันการสร้างโครงการ');
    await expect(dialog).toContainText('Tarnas Tower Phase 2');
    await expect(dialog).toContainText('2 ไซต์');

    // Confirm
    await dialog.getByRole('button', { name: /ยืนยัน/ }).click();

    // Verify redirect + toast
    await expect(page.getByRole('status')).toContainText(/สร้างโครงการ.*เรียบร้อย/);
    await expect(page).toHaveURL(/project\/setup$/);
  });

  test('TC-12 · Date validation · start > end shows error', async ({ page }) => {
    const cp = new CreateProjectPage(page);
    await page.getByLabel(/วันที่เริ่ม/).fill('2027-01-01');
    await page.getByLabel(/วันที่สิ้นสุด/).fill('2026-01-01');
    await expect(page.getByText('วันเริ่มต้องมาก่อนวันสิ้นสุด')).toBeVisible();
  });

  test('TC-51 · Language toggle · TH → EN', async ({ page }) => {
    await expect(page.getByText('ข้อมูลโครงการ')).toBeVisible();
    await page.getByRole('button', { name: /English/ }).click();
    await expect(page.getByText('Project Details')).toBeVisible();
  });
});

⚙️ playwright.config.ts

TypeScriptimport { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  fullyParallel: true,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 2 : undefined,
  reporter: [['html'], ['list'], ['junit', { outputFile: 'results.xml' }]],
  use: {
    baseURL: process.env.BASE_URL ?? 'http://localhost:3000',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
    video: 'retain-on-failure',
    locale: 'th-TH',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },
    { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
  ],
});
💡
Best Practices: ใช้ getByRole, getByLabel · หลีกเลี่ยง CSS selectors ตายตัว · ทุก test มี beforeEach reset state · fixtures สำหรับ auth · trace mode ตอน retry เพื่อ debug

06AI Testing Tools · Comparison 2025

8 tools compared · features · pricing · best fit for ConstructQ

🤖

Playwright + Claude Code + Playwright MCP

⭐ 9.5/10
Playwright + Anthropic Claude via MCP · AI-generated test cases + self-healing
  • ✓ Open source Playwright ฟรี
  • ✓ Claude generate test cases จาก markdown scenarios
  • ✓ Playwright MCP · AI ควบคุม browser + inspect DOM
  • ✓ Self-healing selectors จาก AI
  • ✓ ยืดหยุ่นสุด · integrate CI/CD ได้
  • × ต้องเซ็ตอัพเอง · ไม่มี GUI dashboard
🆓 Playwright ฟรี · Claude ~$20/dev/mo
🎯

Cursor + Playwright

⭐ 9/10
Cursor IDE + Claude/GPT · AI IDE that writes Playwright tests
  • ✓ AI auto-complete Playwright test code
  • ✓ Chat กับ codebase context
  • ✓ ทำ Composer ให้ AI generate ทั้ง file
  • ✓ Debug + refactor ด้วย AI
  • × จ่ายรายเดือน $20/user
  • × Learning curve · ต้อง prompt เก่ง
$20/user/month · Cursor Pro
🧠

Testim.io (Tricentis)

⭐ 8/10
AI-powered test authoring · record/playback + self-healing locators
  • ✓ AI smart locators · self-heal เมื่อ UI เปลี่ยน
  • ✓ Record + playback ง่าย
  • ✓ CI/CD integration ครบ
  • × จ่ายรายปี · Enterprise pricing
  • × Lock-in · ยาก migrate ออก
Enterprise · quote-based
👁️

Mabl

⭐ 8/10
Low-code AI test automation · visual + functional testing
  • ✓ ML-powered auto-heal
  • ✓ Visual regression AI · pixel-perfect
  • ✓ Cloud-based · เร็ว
  • ✓ Cross-browser + mobile
  • × จ่ายรายเดือนสูง
  • × Locked to platform · ไม่ export code
$1,500+/month · plans
🎨

Applitools Eyes

⭐ 8/10
Visual AI testing · integrate กับ Playwright/Cypress
  • ✓ Visual AI · เห็นการเปลี่ยนแปลง UI
  • ✓ Cross-browser screenshot compare
  • ✓ Integrate Playwright/Cypress ได้เลย
  • × เฉพาะ visual · ไม่ทำ functional
  • × ต้องใช้ร่วมกับ Playwright
Free tier · $200+/month for teams
🐺

QA Wolf

⭐ 7.5/10
AI-assisted test creation + QA-as-a-Service model
  • ✓ Human + AI hybrid
  • ✓ ครบวงจร · จ้าง QA team + AI
  • ✓ 24/7 test runs · 4-hour bug fix guarantee
  • × ราคาแพงมาก · $10K+/month
  • × Vendor dependency
$10,000+/month · Enterprise
💫

Reflect.run

⭐ 7.5/10
No-code AI browser testing · record real user flows
  • ✓ No-code · ไม่ต้องเขียนโค้ด
  • ✓ Visual test builder
  • ✓ Cloud-based · จำง่าย
  • × ยืดหยุ่นน้อยกว่า code-based
  • × จ่ายรายเดือน
Free · $50+/user/month
📘

Katalon Studio + Copilot

⭐ 7/10
All-in-one test automation platform with AI Copilot
  • ✓ Free community edition
  • ✓ Support ทุก platform (web/API/mobile)
  • ✓ AI Copilot สำหรับ test generation
  • × UI ไม่ modern เท่า
  • × Learning curve
Free · Enterprise $75+/user/month

📊 Comparison Matrix

Tool Code-based No-code Self-heal Visual AI Free tier CI/CD Thai UI Best for
Playwright + Claude MCP⚠️ AI-assistConstructQ · flexible
Cursor + Playwright⚠️Dev-heavy teams
Testim.io⚠️⚠️Non-dev QA teams
Mabl⚠️ trial⚠️Visual regression
Applitools⚠️ addonVisual test add-on
QA Wolf⚠️Outsourced QA
Reflect.run⚠️⚠️Non-technical
Katalon Copilot⚠️⚠️⚠️All-platform

07Recommendation for ConstructQ

Best combination for Thai construction QC SaaS

🏆
Top Recommendation: Playwright + Cursor IDE + Playwright MCP (Claude) + Applitools Eyes (สำหรับ visual regression) · รวมกันได้ automation ครบวงจร + AI-assisted + visual AI · budget ประหยัด + ยืดหยุ่นสูง

💡 ทำไมเลือกชุดนี้?

  1. Playwright เป็น open-source · ฟรี · maintain โดย Microsoft · community ใหญ่ · เร็วที่สุดใน 2025
  2. Cursor IDE ให้ AI ช่วยเขียนโค้ด · Composer generate ทั้ง test file ได้ · ประหยัดเวลา 60-70%
  3. Playwright MCP (Claude) · AI ควบคุม browser ได้ · generate test จาก scenario ภาษาไทย
  4. Applitools สำหรับ visual regression · จับ UI bug ที่ Playwright plain ไม่เห็น (color · alignment)
  5. Total cost: Playwright ฟรี + Cursor $20 + Claude $20 + Applitools $200/mo = ~$240/mo · เทียบกับ Testim/Mabl หลักหมื่น

🚀 Suggested Implementation Roadmap

  1. Week 1-2 · Setup: Playwright + Cursor + Claude Code · Config CI (GitHub Actions)
  2. Week 3-4 · Foundation: Page Object Model · Auth fixture · CreateProject POM · run P1 tests
  3. Week 5-6 · Coverage: เพิ่ม test P2 · integrate Applitools · visual baselines
  4. Week 7-8 · CI/CD: Parallel runs · report portal · Slack notifications
  5. Ongoing: AI generate test จาก scenarios · Claude MCP for exploratory testing · Weekly report

🎓 Skills to Build

  • TypeScript · basic to intermediate · type safety สำคัญ
  • Playwright API · locators · assertions · fixtures · POM pattern
  • Claude/AI Prompting · เขียน prompt ให้ AI generate test cases ที่ดี
  • Git + GitHub Actions · workflow · secrets · caching
  • Test data management · Faker · seed factories
⚠️
Common Pitfalls to avoid:
  • อย่าใช้ AI generate 100% · human review เสมอ (30% ของ AI test มี bug)
  • อย่าเขียน selector ตายตัว (class name / xpath) · ใช้ role + label
  • อย่าให้ test dependency ระหว่างกัน · แต่ละ test ต้อง independent
  • อย่า commit .env credentials · ใช้ GitHub Secrets
  • อย่า flaky ignore · แก้ทันที · flaky test = confidence ต่ำลง

08Appendix

📌 Version History

  • ConstructQ_CreateProject_v14.0.html · 30 มิ.ย. 2569 · Confirm popup added
  • เอกสารนี้ v1.0 · 9 ก.ค. 2569 · Initial release · 57 test cases + Playwright + AI tools

🔗 References

  • Playwright Docs: https://playwright.dev
  • Playwright MCP: https://github.com/microsoft/playwright-mcp
  • Cursor IDE: https://cursor.com
  • Anthropic Claude: https://claude.ai
  • Applitools Eyes: https://applitools.com
  • WCAG 2.1 AA: https://www.w3.org/WAI/WCAG21/quickref

📊 Excel Companion

ดูไฟล์ ConstructQ_CreateProject_TestScenario_v1.0.xlsx คู่กัน · มี 4 sheets:

  1. Summary: Test overview + statistics
  2. Test Scenarios: 12 test areas overview
  3. Test Cases: 57 detailed cases (TC ID · Scenario · Steps · Expected · Priority · Type · Status)
  4. Playwright Coverage: test cases mapped กับ Playwright test files